package com.chrisevansdev.irisysaudit;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.chrisevansdev.irisysaudit.CheckoutManager.UpdateListener;

public class AuditConnections extends Activity
{
	boolean mXMLLogging = false;
	boolean mNetworkLogging = false;
	
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.audit_connections);
    }
	
	// main onClick listener for activity
    public void onClick(View view) {
		Intent intent = null;
		
		switch (view.getId()) 
		{
		case R.id.btnAuditConfig:
			finish();
			
			intent = new Intent (this, AuditConfig.class);
			
			ArrayList<UpdateListener> UpdateListeners = new ArrayList<UpdateListener>();
			if (mXMLLogging) UpdateListeners.add(new XMLLogger());
			if (mNetworkLogging) UpdateListeners.add(new NetworkLogger());
			
			intent.putExtra("UpdateListeners", UpdateListeners);
			
    		startActivity(intent);
			break;
			
		case R.id.checkBoxXML:
			
			// store filename if applicable
					
			break;
			
		case R.id.checkBoxNetwork:
			
			// store ip and port
			
			break;
		
		default:
			break;
		}
    }
}
